//
//  ZGSDownTableViewCell.m
//  Tour
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "ZGSDownTableViewCell.h"
#define HEIGHT self.contentView.frame.size.height
#define WIDTH self.contentView.frame.size.width
@implementation ZGSDownTableViewCell


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatView];
    }
    return self;
}

- (void)creatView{
    self.leftImage = [[UIImageView alloc] init];
    [self.contentView addSubview:self.leftImage];
    [_leftImage release];
    
    self.labelTitle = [[UILabel alloc] init];
    [self.contentView addSubview:self.labelTitle];
    [_labelTitle release];
    
    self.labelUsername = [[UILabel alloc] init];
    [self.contentView addSubview:self.labelUsername];
    [_labelUsername release];
    
    self.labelViews = [[UILabel alloc] init];
    [self.contentView addSubview:self.labelViews];
    [_labelViews release];

    self.labelReplys = [[UILabel alloc] init];
    [self.contentView addSubview:self.labelReplys];
    [_labelReplys release];
    
}
- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.leftImage.frame = CGRectMake(5,5, WIDTH / 3.5, HEIGHT - 10);
//    self.leftImage.layer.borderWidth = 1;
    
    self.labelTitle.frame = CGRectMake(WIDTH / 3.5 + 13, 5, WIDTH / 3.5 * 2, HEIGHT / 2);
//    self.labelTitle.layer.borderWidth = 1;
    self.labelTitle.font = [UIFont systemFontOfSize:13];
    self.labelTitle.numberOfLines = 2;
    self.labelUsername.frame = CGRectMake(WIDTH / 3.5 + 13, HEIGHT / 2 + 5, WIDTH / 3.5 * 2, 10);
//    self.labelUsername.layer.borderWidth = 1;
    self.labelUsername.font = [UIFont systemFontOfSize:9];
    self.labelUsername.textColor = [UIColor grayColor];
    self.labelViews.frame = CGRectMake(WIDTH / 3.5 + 13, HEIGHT / 2 + 15 + 10, 80, 10);
//    self.labelViews.layer.borderWidth = 1;
    self.labelViews.font = [UIFont systemFontOfSize:10];
    self.labelViews.textColor = [UIColor grayColor];
    self.labelReplys.frame = CGRectMake(WIDTH / 3.5 + 13 + 60 + 30, HEIGHT / 2 + 25, 50, 10);
//    self.labelReplys.layer.borderWidth = 1;
    self.labelReplys.font = [UIFont systemFontOfSize:10];
    self.labelReplys.textColor = [UIColor grayColor];
    
    
    
    
}
@end
